package android.MediaStreaming;

import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ReceiverActivity extends Activity {

    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.receiver_layout);	/*Means that all the widgets (buttons, text fields etc. 
		  												  can be found in res/layout/file_system_layout.xml */

        Button backToMainButton = (Button) findViewById(R.id.BackButton);
        //next points to the button named "Button02" in file_system_layout.xml
        backToMainButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
            	Intent intent = new Intent();
                setResult(RESULT_OK, intent);
                finish();	/*When clicking the button, The application returns back to the 
                			  activity that called this one, in our case MediaStreaming */
            }

        });
    }
}